<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "user_credential".
 *
 * @property int $user_id 用户id
 * @property string $username 用户名或手机号或邮箱等
 * @property int $type 账号类型:1用户名2手机号3邮箱,4微信
 * @property string $content 凭证内容
 *
 * @property User $user
 */
class UserCredential extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'user_credential';
    }

    /**
     * Gets query for [[User]].
     *
     * @return \yii\db\ActiveQuery
     */
    public function getUser()
    {
        return $this->hasOne(User::className(), ['user_id' => 'user_id']);
    }
}
